package com.leo.ktvplayer.bluetooth.bletask;

import com.leo.ktvplayer.bluetooth.BleConstant;
import com.leo.ktvplayer.bluetooth.BleData;

/**
 * Created by LeoLu on 2017/5/9.
 */

public class BleEngineFactory {
    private static IBleDataEngine instance;

    public  static IBleDataEngine getInstance(String title){
        if (title.equals(BleConstant.KEY_FOR_LOCK_DEVICE)){
            instance = new BleLockDevice();
        } else if (title.equals(BleConstant.KEY_FOR_READ_MONEY)){
            instance = new BleReceiveMoney();
        } else if (title.equals(BleConstant.KEY_FOR_UNLOCK_DEVICE)){
            instance = new BleUnlockDevice();
        } else if (title.equals(BleConstant.KEY_FOR_UPDATE_DEVICE_AUDIO) ){
            instance = new BleUpdateDeviceVoice();
        } else if (title.equals(BleConstant.KEY_FOR_UPDATE_MIC_AUDIO)){
            instance = new BleUpdateMicVoice();
        } else if (title.equals(BleConstant.KEY_FOR_OPEN_MONEY_RECEIVER)) {
            instance = new BleReceiveMoney();
        } else if (title.equals(BleConstant.KEY_FOR_CLOSE_MONEY_RECEIVER)){
            instance = new BleUnlockMoneyReceiver();
        }
        return instance;
    }

}
